package com.bugull.farm.core.store;

import com.bugull.mongo.SimpleEntity;
import com.bugull.mongo.annotations.Embed;
import com.bugull.mongo.annotations.EnsureIndex;
import com.bugull.mongo.annotations.Entity;

import java.util.Date;

/**
 * Created by Pwenlee on 2017/7/20.
 */
@Entity
@EnsureIndex("{terminalSN : 1, unique : true}")
public class CommandTask extends SimpleEntity {

    /**
     * 终端序列号
     */
    private String terminalSN;

    @Embed
    private TempSetting tempSetting;

    private Boolean tempComplete;//温度设置完成标识，收到温度设置成功反馈时为True，失败反馈为False，是否必填:否

    /**
     * 位置设置，报警距离、上传间隔
     */
    @Embed
    private PositionSetting positionSetting;

    private Boolean positionComplete;//位置设置完成标识，收到位置设置成功反馈时为True，失败反馈为False，是否必填:否

    /*
     * 湿度设置，报警上下限
     */
    @Embed
    private HumSetting humSetting;

    private Boolean humComplete;//湿度设置完成标志，收到湿度设置成功反馈时为TRUE，失败反馈未False，是否必填：否

    private Date date;

    public String getTerminalSN() {
        return terminalSN;
    }

    public void setTerminalSN(String terminalSN) {
        this.terminalSN = terminalSN;
    }

    public TempSetting getTempSetting() {
        return tempSetting;
    }

    public void setTempSetting(TempSetting tempSetting) {
        this.tempSetting = tempSetting;
    }

    public PositionSetting getPositionSetting() {
        return positionSetting;
    }

    public void setPositionSetting(PositionSetting positionSetting) {
        this.positionSetting = positionSetting;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Boolean getTempComplete() {
        return tempComplete;
    }

    public void setTempComplete(Boolean tempComplete) {
        this.tempComplete = tempComplete;
    }

    public Boolean getPositionComplete() {
        return positionComplete;
    }

    public void setPositionComplete(Boolean positionComplete) {
        this.positionComplete = positionComplete;
    }

    public HumSetting getHumSetting() {
        return humSetting;
    }

    public void setHumSetting(HumSetting humSetting) {
        this.humSetting = humSetting;
    }

    public Boolean getHumComplete() {
        return humComplete;
    }

    public void setHumComplete(Boolean humComplete) {
        this.humComplete = humComplete;
    }
}
